With the advancement of science and technology, the popularity and development of computer system have gained a great achievement, and the evolvement of humanity enters into a new age. Thus, it is easily to observe people using the computer at home, office or public place. Accordingly, the Internet is also universally developed as well. The combination of computer and Internet brings more frequent and greater contacts between each Internet user and service providers. Therefore, the combination of computer system and computer network can be extensively applied to various technical or commercial services to bring illimitable potentials to human's life.
In general, the computer system employs a power management system to conserve power. On Dec. 22, 1996, Intel, Microsoft and Toshiba jointly established and published an ACPI (Advanced Configuration and Power Interface) standard, which integrates power management into the operating system to improve the efficiency of power management and accelerate the processing speed of computer system through a unified interface for controlling the power supply operation of all hardware.
According the definition of ACPI standard, the power management of computer system includes six modes, S0˜S5, in which S0 is a normal operating mode; S1˜S3 is power saving modes; S4 is a hibernation mode; and S5 is a power off mode. S1˜S4 modes are slightly different with each other in the sense of power saving. S1 mode represents that the operation of the computer system can be quickly recovered and no system context is lost. S2 mode is similar to S1 mode, but the contents of CPU cache and system memory are lost, and after the computer system is recovered, the operating system needs to maintain the contents of CPU cache and system memory. S3 mode is a suspended-to-RAM mode, in which only RAM and the power management controller are powered on and the other hardware is in the off state when the computer system enters the S3 mode. Certainly, after entering the S3 mode, the operation data of the computer system are stored in RAM, and when returning to the normal operating mode, the computer system will quickly restore these data from RAM. S4 mode is a suspend-to-disk mode, in which when the computer system enters the S4 mode, BIOS selects a backup disk partition with the size being equivalent to a system partition to store subsequent operation data of the computer system, and when returning to the normal operating mode, the computer system will restore these data from the backup disk partition.
On the other hand, the computer system mainly includes a display, a computer host and other peripherals. The transmission between the computer host and the display is proceeded via the signal cable, and the other peripherals are electrically connected with the computer host. However, when a user is removing an important component of the computer system, such as a display card or CPU, he may not be aware whether the computer system is in a power off mode (S5) or a standby mode (S3). As a result, the destructions and damages of the computer system or important components will be inadvertently caused, since the computer system is not completely powered off while the important components therein are suddenly installed or removed.
To overcome the defects of the above-mentioned prior art and to ensure the computer system is correctly powered off in order to avoid damages as a result of user's incautious operation for the removal of the internal components, some components having the hot swappable function are provided on the market, so that the components can be removed while the computer system is not completely powered off. However, not all components of the computer system support the hot swappable function, and the production costs of the components having the hot swappable function are very high. Thus, it is a problem needing to be overcome for the company who wants to promote their market competition with lower production costs.
Therefore, it is needed to provide a method and apparatus for monitoring the power state of the computer system, which can overcome the defects of the above-mentioned prior art, and ensure that the computer system is in the S4 mode (suspend-to-disk mode) when the user is replacing the internal components of the computer system.